<template>
	<view class="mainbgc" v-if="pageShow">
		<header-top :messageInfo="{typeFlag:true,message:'打卡明细',liner:false}"></header-top>
		<view class="mainpadding">
			<view class="mainpadding  ffffff radius">
				<view class="left flexleft">
					<view class="imgs">
						<image :src="curr_kq.staff.avatar_text" mode=""></image>
					</view>
					<view class="mingzi">{{curr_kq.staff.username}}</view>
				</view>
			</view>
			<view class="daka">
				<view class="shangban" v-if="curr_kq.start_kqrecord">
					<view class="sbdaka">上班打卡 {{curr_kq.start_kqrecord.signtime_text}}</view>
					<view class="flexleft dizhibox">
						<view class="addressicon2"></view>
						<view class="dizhi">{{curr_kq.start_kqrecord.adress}}</view>
					</view>
					<view class="flexleft">
						<view class="dakatp" v-for="(item,index) in curr_kq.start_kqrecord.images_text" :key="index"
						@click="lbtpriview(index,curr_kq.start_kqrecord.images_text)">
							<image :src="item" mode=""></image>
						</view>
					</view>
					<view class="dizhi flexleft margin_top" v-if="curr_kq.start_kqrecord.notes">备注：{{curr_kq.start_kqrecord.notes}}</view>
				</view>
				<view class="shangban" v-if="curr_kq.end_kqrecord">
					<view class="sbdaka">下班打卡 {{curr_kq.end_kqrecord.signtime_text}}</view>
					<view class="flexleft dizhibox">
						<view class="addressicon2"></view>
						<view class="dizhi">{{curr_kq.end_kqrecord.adress}}</view>
					</view>
					<view class="flexleft">
						<view class="dakatp" v-for="(item,index) in curr_kq.end_kqrecord.images_text" :key="index"
						@click="lbtpriview(index,curr_kq.end_kqrecord.images_text)">
							<image :src="item" mode=""></image>
						</view>
					</view>
					<view class="dizhi flexleft margin_top" v-if="curr_kq.end_kqrecord.notes">备注：{{curr_kq.end_kqrecord.notes}}</view>
				</view>
				<view class="jindut">
					<image class="yuanincon" src="../../../static/image/system/yuan.png" mode=""></image>
					<view class="jinduline"></view>
					<image class="yuanincon towyuan" src="../../../static/image/system/yuan.png" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid:"",
				curr_kq:{},
				pageShow:false
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.init()
		},
		methods: {
			init(){
				httpRequest.request('/dhtapi/user/kqDetailRecord', 'POST', {
					id:this.listid
				}).then(res => {
					this.curr_kq = res.data
					this.pageShow = true
				})
			},
			lbtpriview(index,arr) {
				var i = arr; //获取当前页面的轮播图数据
				//uniapp预览轮播图
				uni.previewImage({
					current: index, //预览图片的下标
					urls: i //预览图片的地址，必须要数组形式，如果不是数组形式就转换成数组形式就可以
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.jindut{
		position: absolute;
		top: 0;
		left: 0;
	}
	.jinduline{
		position: relative;
		left: 44%;
		top: 20%;
		bottom: 14rpx;
		height: 320rpx;
		width: 2rpx;
		background-color:  #BEC0BF;
	}
	.yuanincon{
		width: 24rpx;
		
		height: 24rpx;
	}
	.towyuan{
		position: relative;
		bottom: 30rpx;
	}
	.daka{
		position: relative;
	}
	.dizhibox{
		margin: 6rpx 0 12rpx;
		
	}
	.shangban{
		margin: 54rpx 0 0 40rpx;
	}
	.dakatp{
		width: 110rpx;
		height: 110rpx;
		margin-right: 30rpx;
		border-radius: 16rpx;
		margin-top: 20rpx;
		image {
			border-radius: 16rpx;
			width: 100%;
			height: 100%;
		}
	}
	.dizhi{
		font-size: 24rpx;
		
		margin-left: 10rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
	}
	.riqi {
		font-size: 24rpx;
		margin-top: 16rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
	}

	.mingzi {
		font-size: 28rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #000000;
	}

	.imgs {
		width: 84rpx;
		height: 84rpx;
		border-radius: 50%;
		margin-right: 18rpx;

		image {
			width: 100%;
			height: 100%;
			border-radius: 50%;
		}
	}
</style>
